import App from './App'
// import store from './store'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false

import common from './script/common.js';
Vue.prototype.$common = common;

import request from './utils/request.js'
Vue.prototype.$httpost = request;

import moment from 'moment';
Vue.prototype.$moment = moment;


// 图片地址
Vue.prototype.$baseUrl = "https://api.zhanfang.comdns.cn/public/";

// 图片上传地址
Vue.prototype.$imgUpload = "https://api.zhanfang.comdns.cn/common/Upload/upload?file=uniapp";

// 防抖函数
// Vue.prototype.$debounce = function(func, wait, immediate) {
//   let timeout;
//   return function() {
//     let context = this, args = arguments;
//     let later = function() {
//       timeout = null;
//       if (!immediate) func.apply(context, args);
//     };
//     let callNow = immediate && !timeout;
//     clearTimeout(timeout);
//     timeout = setTimeout(later, wait);
//     if (callNow) func.apply(context, args);
//   };
// };

App.mpType = 'app'
const app = new Vue({
  ...App
})

app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif